<?php
return [
    'bootstrap' => [
            // 将 log 组件 ID 加入引导让它始终载入
            'log',
    ],
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost:3307;dbname=ceping',
            'username' => 'root',
            'password' => 'Dgq990311',
            'charset' => 'utf8',
            'tablePrefix'=>'c_',
//            'class' => 'yii\db\Connection',
//            'dsn' => 'mysql:host=hdm189315159.my3w.com;dbname=hdm189315159_db',
//            'username' => 'hdm189315159',
//            'password' => 'growthmemo',
//            'charset' => 'utf8',
//            'tablePrefix'=>'c_',
        ],

//        'authManager'=>['class'=>'yii\rbac\DbManager'],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning','info','trace'],
                    'categories' => ['requests.*'],
                    'logFile' => '@app/runtime/logs/Mylog/requests.log',
                    'maxFileSize' => 1024 * 2,
                    'maxLogFiles' => 20,
                ],
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning','info','trace'],
                    'categories' => ['db.*'],
                    'logFile' => '@app/runtime/logs/Mylog/db.log',
                    'maxFileSize' => 1024 * 2,
                    'maxLogFiles' => 20,
                ]
            ],
        ],
    ],
];




